package cn.com.db.dao;


import cn.com.db.model.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface AddressDao {
    void createAddress(Address address);
    Address getAddressById(@Param("id")String id);
    List<Address> getUserAddress(@Param("userId")String userId,
                                 @Param("rowStart")Integer rowStart,
                                 @Param("pageSize")Integer pageSize);
    Integer countUserAddress(@Param("userId")String userId);
    Address getUserDefAddress(@Param("userId")String userId);
    void update(Address address);
    void delete(@Param("id")String id);
}

